home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsITransfer.idl < prev    next >
Text File  |  2006-05-08  |  4KB  |  108 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *   Blake Ross <blaker@netscape.com>
  24.  *
  25.  * Alternatively, the contents of this file may be used under the terms of
  26.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  27.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28.  * in which case the provisions of the GPL or the LGPL are applicable instead
  29.  * of those above. If you wish to allow use of your version of this file only
  30.  * under the terms of either the GPL or the LGPL, and not to allow others to
  31.  * use your version of this file under the terms of the MPL, indicate your
  32.  * decision by deleting the provisions above and replace them with the notice
  33.  * and other provisions required by the GPL or the LGPL. If you do not delete
  34.  * the provisions above, a recipient may use your version of this file under
  35.  * the terms of any one of the MPL, the GPL or the LGPL.
  36.  *
  37.  * ***** END LICENSE BLOCK ***** */
  38.  
  39. #include "nsIWebProgressListener2.idl"
  40.  
  41. interface nsIURI;
  42. interface nsICancelable;
  43. interface nsIMIMEInfo;
  44. interface nsILocalFile;
  45.  
  46. [scriptable, uuid(23c51569-e9a1-4a92-adeb-3723db82ef7c)]
  47. interface nsITransfer : nsIWebProgressListener2 {
  48.  
  49.     /**
  50.      * Initializes the transfer with certain properties.  This function must
  51.      * be called prior to accessing any properties on this interface.
  52.      *
  53.      * @param aSource The source URI of the transfer. Must not be null.
  54.      *
  55.      * @param aTarget The target URI of the transfer. Must not be null.
  56.      *
  57.      * @param aDisplayName The user-readable description of the transfer.
  58.      *                     Can be empty.
  59.      *
  60.      * @param aMIMEInfo The MIME info associated with the target,
  61.      *                  including MIME type and helper app when appropriate.
  62.      *                  This parameter is optional.
  63.      *
  64.      * @param startTime Time when the download started (ie, when the first
  65.      *                  response from the server was received)
  66.      *                  XXX presumably wbp and exthandler do this differently
  67.      *
  68.      * @param aTempFile The location of a temporary file; i.e. a file in which
  69.      *                  the received data will be stored, but which is not
  70.      *                  equal to the target file. (will be moved to the real
  71.      *                  target by the caller, when the download is finished)
  72.      *                  May be null.
  73.      *
  74.      * @param aCancelable An object that can be used to abort the download.
  75.      *                    Must not be null.
  76.      *                    Implementations are expected to hold a strong
  77.      *                    reference to this object until the download is
  78.      *                    finished, at which point they should release the
  79.      *                    reference.
  80.      */
  81.     void init(in nsIURI aSource,
  82.               in nsIURI aTarget,
  83.               in AString aDisplayName,
  84.               in nsIMIMEInfo aMIMEInfo,
  85.               in PRTime startTime,
  86.               in nsILocalFile aTempFile,
  87.               in nsICancelable aCancelable);
  88. };
  89.  
  90. %{C++
  91. /**
  92.  * A component with this contract ID will be created each time a download is
  93.  * started, and nsITransfer::Init will be called on it and an observer will be set.
  94.  *
  95.  * Notifications of the download progress will happen via
  96.  * nsIWebProgressListener/nsIWebProgressListener2.
  97.  *
  98.  * INTERFACES THAT MUST BE IMPLEMENTED:
  99.  *   nsITransfer
  100.  *   nsIWebProgressListener
  101.  *   nsIWebProgressListener2
  102.  *
  103.  * XXX move this to nsEmbedCID.h once the interfaces (and the contract ID) are
  104.  * frozen.
  105.  */
  106. #define NS_TRANSFER_CONTRACTID "@mozilla.org/transfer;1"
  107. %}
  108.